<?xml version="1.0" encoding="utf-8"?>

<!-- http://schema.org/Organization -->

<Content type="xform" name="EditOrganisation">
	<model>
		<instance>
			<tblContent>
				<nContentKey/>
				<nContentPrimaryId/> 
				<nVersion/>
				<cContentForiegnRef/>
				<cContentName/>
				<cContentSchemaName>Organisation</cContentSchemaName> 
				<cContentXmlBrief>
          <Content itemtype="http://schema.org/Thing" showRelated="Contact">
            <name/>
						<Images>
							<img class="thumbnail"/>
							<img class="display"/>
              <img class="detail"/>
						</Images>
            <url/>
            <description/>
            <Organization itemtype="http://schema.org/Organization">
              <location itemtype="http://schema.org/PostalAddress">
                <PostalAddress>
                  <name/>
                  <description/>
                  <streetAddress/>
                  <postalCode/>
                  <postOfficeBoxNumber/>
                  <addressLocality/>
                  <addressRegion/>
                  <addressCountry/>
                </PostalAddress>
                <GeoCoordinates>
                  <elevation/>
                  <latitude/>
                  <longitude/>
                </GeoCoordinates>
              </location>
              <address itemtype="http://schema.org/PostalAddress">
                <PostalAddress>
                  <name/>
                  <description/>
                  <streetAddress/>
                  <postalCode/>
                  <postOfficeBoxNumber/>
                  <addressLocality/>
                  <addressRegion/>
                  <addressCountry/>
                </PostalAddress>
              </address>
              <contactPoint itemtype="http://schema.org/ContactPoint">
                <ContactPoint>
                  <name/>
                  <description/>
                  <contactType/>
                  <email/>
                  <faxNumber/>
                  <telephone/>
                </ContactPoint>
              </contactPoint>
              <duns/>
              <email/>
              <faxNumber/>
              <foundingDate/>
              <globalLocationNumber/>
              <usicv4/>
              <legalName/>
              <logo>
                <img class="logo"/>
              </logo>
              <naics/>
              <taxID/>
              <telephone/>
              <vatID/>
              <localBusiness itemtype="http://schema.org/LocalBusiness">
                <currenciesAccpeted/>
                <openingHours/>
                <paymentAccepted/>
                <priceRange/>
              </localBusiness>
            </Organization>
					</Content>
				</cContentXmlBrief>
				<cContentXmlDetail>
          <Content itemtype="http://schema.org/Thing">
            <name/>
            <Images>
              <img class="thumbnail"/>
              <img class="display"/>
              <img class="detail"/>
            </Images>
            <url/>
            <description/>
            <body/>
            <Organization itemtype="http://schema.org/Organization">
              <location itemtype="http://schema.org/PostalAddress">
                <PostalAddress>
                  <name/>
                  <description/>
                  <streetAddress/>
                  <postalCode/>
                  <postOfficeBoxNumber/>
                  <addressLocality/>
                  <addressRegion/>
                  <addressCountry/>
                </PostalAddress>
                <GeoCoordinates>
                  <elevation/>
                  <latitude/>
                  <longitude/>
                </GeoCoordinates>
              </location>
              <address itemtype="http://schema.org/PostalAddress">
                <PostalAddress>
                  <name/>
                  <description/>
                  <streetAddress/>
                  <postalCode/>
                  <postOfficeBoxNumber/>
                  <addressLocality/>
                  <addressRegion/>
                  <addressCountry/>
                </PostalAddress>
              </address>
              <contactPoint itemtype="http://schema.org/ContactPoint">
                <ContactPoint>
                  <name/>
                  <description/>
                  <contactType/>
                  <email/>
                  <faxNumber/>
                  <telephone/>
                </ContactPoint>
              </contactPoint>
              <duns/>
              <email/>
              <faxNumber/>
              <foundingDate/>
              <globalLocationNumber/>
              <usicv4/>
              <legalName/>
              <logo>
                <img class="logo"/>
              </logo>
              <naics/>
              <taxID/>
              <telephone/>
              <vatID/>
              <localBusiness itemtype="http://schema.org/LocalBusiness">
                <currenciesAccepted/>
                <openingHours/>
                <paymentAccepted/>
                <priceRange/>
              </localBusiness>
              </Organization>
            </Content>
				</cContentXmlDetail>
				<nAuditId/>
				<nAuditKey/>
				<dPublishDate/>
				<dExpireDate/>
				<dInsertDate/>
				<nInsertDirId/>
				<dUpdateDate/>
				<nUpdateDirId/>
				<nStatus>1</nStatus>
				<cDescription/>
			</tblContent>
		</instance>
		<submission id="EditContent" action="" method="post" event="return form_check(this)"/>
		<bind nodeset="tblContent">
			<bind id="dPublishDate" nodeset="dPublishDate" required="false()" type="string"/>
			<bind id="dExpireDate" nodeset="dExpireDate" required="false()" type="string"/>
			<bind id="nStatus" nodeset="nStatus" required="true()" type="string"/>
      <bind id="cOrganizationName" nodeset="cContentName" required="true()" type="string"/>
			<bind nodeset="cContentXmlBrief/Content">
				<bind id="cOrganizationName" nodeset="name" required="false()" type="string"/>
        <bind id="cContentThumbnail" nodeset="Images/img[@class='thumbnail']" required="false()" type="xml-replace"/>
        <bind id="cContentDisplay" nodeset="Images/img[@class='display']" required="false()" type="xml-replace"/>
        <bind id="cContentFullSizePicture" nodeset="Images/img[@class='detail']" required="false()" type="xml-replace"/>
        <bind id="cOrganizationWebsite" nodeset="url" required="false()" type="string"/>
        <bind id="cOrganizationProfile" nodeset="description" required="false()" type="string"/>
				<bind nodeset="Organization"> 
          <bind id="cOrganizationType" nodeset="@itemtype" required="false()"/>
          <bind id="cOrganizationLegalName" nodeset="legalName" required="false()"/>
          <bind id="cOrganizationFoundingDate" nodeset="foundingDate" required="false()"/>
          <bind id="cOrganizationTelephone" nodeset="telephone" required="false()" type="string"/>
          <bind id="cOrganizationFax" nodeset="faxNumber" required="false()" type="string"/>
          <bind id="cOrganizationEmail" nodeset="email" required="false()" type="string"/>
          <bind id="cOrganizationLogo" nodeset="logo/img[@class='logo']" required="false()" type="xml-replace"/>
          <bind nodeset="location/PostalAddress">
            <bind id="cContentLocationNo" nodeset="name" required="false()" type="string"/>
            <bind id="cContentLocationStreet" nodeset="streetAddress" required="false()" type="string"/>
            <bind id="cContentLocationTown" nodeset="addressLocality" required="false()" type="string"/>
            <bind id="cContentLocationRegion" nodeset="addressRegion" required="false()" type="string"/>
            <bind id="cContentLocationPostCode" nodeset="postalCode" required="false()" type="string"/>
            <bind id="cLocationCountry" nodeset="addressCountry" required="false()" type="string"/>
          </bind>
          <bind nodeset="location/GeoCoordinates">
            <bind id="cContentLocationLong" nodeset="longitude" required="false()" type="string"/>
            <bind id="cContentLocationLat" nodeset="latitude" required="false()" type="string"/>
          </bind>
          <bind nodeset="address/PostalAddress">
            <bind id="cPostalAddressName" nodeset="name" required="false()" type="string"/>
            <bind id="cPostalAddressStreet" nodeset="streetAddress" required="false()" type="string"/>
            <bind id="cPostalAddressTown" nodeset="addressLocality" required="false()" type="string"/>
            <bind id="cPostalAddressRegion" nodeset="addressRegion" required="false()" type="string"/>
            <bind id="cPostalAddressPostCode" nodeset="postalCode" required="false()" type="string"/>
            <bind id="cPostalAddressCountry" nodeset="addressCountry" required="false()" type="string"/>
          </bind>
          <bind nodeset="contactPoint/ContactPoint">
            <bind id="cContactPointName" nodeset="name" required="false()" type="string"/>
            <bind id="cOrganizationTelephone" nodeset="telephone" required="false()" type="string"/>
            <bind id="cOrganizationFax" nodeset="faxNumber" required="false()" type="string"/>
            <bind id="cOrganizationEmail" nodeset="email" required="false()" type="string"/>
            <bind id="cContentFacebook" nodeset="@facebookURL" required="false()" type="string"/>
            <bind id="cContentTwitter" nodeset="@twitterURL" required="false()" type="string"/>
            <bind id="cContentLinkedIn" nodeset="@linkedInURL" required="false()" type="string"/>
            <bind id="cContentGooglePlus" nodeset="@googlePlusURL" required="false()" type="string"/>
            <bind id="cContentPinterest" nodeset="@pinterestURL" required="false()" type="string"/>
          </bind>
          <bind id="cOrganizationDuns" nodeset="duns" required="false()" type="string"/>
          <bind id="cOrganizationTaxID" nodeset="taxID" required="false()" type="string"/>
          <bind id="cOrganizationVatID" nodeset="vatID" required="false()" type="string"/>
          <bind nodeset="localBusiness">
            <bind id="cLocalBusinessCurrenciesAccepted" nodeset="currenciesAccepted" required="false()" type="string"/>
            <bind id="cLocalBusinessOpeningHours" nodeset="openingHours" required="false()" type="string"/>
            <bind id="cLocalBusinessPaymentAccepted" nodeset="paymentAccepted" required="false()" type="string"/>
            <bind id="cLocalBusinessPriceRange" nodeset="priceRange" required="false()" type="string"/>
          </bind>
        </bind>
			</bind>
			<bind nodeset="cContentXmlDetail/Content">
        <bind id="cOrganizationName" nodeset="name" required="false()" type="string"/>
        <bind id="cContentThumbnail" nodeset="Images/img[@class='thumbnail']" required="false()" type="xml-replace"/>
        <bind id="cContentDisplay" nodeset="Images/img[@class='display']" required="false()" type="xml-replace"/>
        <bind id="cContentFullSizePicture" nodeset="Images/img[@class='detail']" required="false()" type="xml-replace"/>
        <bind id="cOrganizationWebsite" nodeset="url" required="false()" type="string"/>
        <bind id="cOrganizationProfile" nodeset="description" required="false()" type="string"/>
        <bind id="cOrganizationBody" nodeset="body" required="false()" type="string"/>
        <bind nodeset="Organization">
          <bind id="cOrganizationType" nodeset="@itemtype" required="false()"/>
          <bind id="cOrganizationLegalName" nodeset="legalName" required="false()"/>
          <bind id="cOrganizationFoundingDate" nodeset="foundingDate" required="false()"/>
          <bind id="cOrganizationTelephone" nodeset="telephone" required="false()" type="string"/>
          <bind id="cOrganizationFax" nodeset="faxNumber" required="false()" type="string"/>
          <bind id="cOrganizationEmail" nodeset="email" required="false()" type="string"/>
          <bind id="cOrganizationLogo" nodeset="logo/img[@class='logo']" required="false()" type="xml-replace"/>
          <bind nodeset="location/PostalAddress">
            <bind id="cContentLocationNo" nodeset="name" required="false()" type="string"/>
            <bind id="cContentLocationStreet" nodeset="streetAddress" required="false()" type="string"/>
            <bind id="cContentLocationTown" nodeset="addressLocality" required="false()" type="string"/>
            <bind id="cContentLocationRegion" nodeset="addressRegion" required="false()" type="string"/>
            <bind id="cContentLocationPostCode" nodeset="postalCode" required="false()" type="string"/>
            <bind id="cLocationCountry" nodeset="addressCountry" required="false()" type="string"/>
          </bind>
          <bind nodeset="location/GeoCoordinates">
            <bind id="cContentLocationLong" nodeset="longitude" required="false()" type="string"/>
            <bind id="cContentLocationLat" nodeset="latitude" required="false()" type="string"/>
          </bind>
          <bind nodeset="address/PostalAddress">
            <bind id="cPostalAddressName" nodeset="name" required="false()" type="string"/>
            <bind id="cPostalAddressStreet" nodeset="streetAddress" required="false()" type="string"/>
            <bind id="cPostalAddressTown" nodeset="addressLocality" required="false()" type="string"/>
            <bind id="cPostalAddressRegion" nodeset="addressRegion" required="false()" type="string"/>
            <bind id="cPostalAddressPostCode" nodeset="postalCode" required="false()" type="string"/>
            <bind id="cPostalAddressCountry" nodeset="addressCountry" required="false()" type="string"/>
          </bind>
          <bind nodeset="contactPoint/ContactPoint">
            <bind id="cOrganizationName" nodeset="name" required="false()" type="string"/>
            <bind id="cOrganizationTelephone" nodeset="telephone" required="false()" type="string"/>
            <bind id="cOrganizationFax" nodeset="faxNumber" required="false()" type="string"/>
            <bind id="cOrganizationEmail" nodeset="email" required="false()" type="string"/>
            <bind id="cContentFacebook" nodeset="@facebookURL" required="false()" type="string"/>
            <bind id="cContentTwitter" nodeset="@twitterURL" required="false()" type="string"/>
            <bind id="cContentLinkedIn" nodeset="@linkedInURL" required="false()" type="string"/>
            <bind id="cContentGooglePlus" nodeset="@googlePlusURL" required="false()" type="string"/>
            <bind id="cContentPinterest" nodeset="@pinterestURL" required="false()" type="string"/>
          </bind>
          <bind id="cOrganizationDuns" nodeset="duns" required="false()" type="string"/>
          <bind id="cOrganizationTaxID" nodeset="taxID" required="false()" type="string"/>
          <bind id="cOrganizationVatID" nodeset="vatID" required="false()" type="string"/>
          <bind nodeset="localBusiness">
            <bind id="cLocalBusinessCurrenciesAccepted" nodeset="currenciesAccepted" required="false()" type="string"/>
            <bind id="cLocalBusinessOpeningHours" nodeset="openingHours" required="false()" type="string"/>
            <bind id="cLocalBusinessPaymentAccepted" nodeset="paymentAccepted" required="false()" type="string"/>
            <bind id="cLocalBusinessPriceRange" nodeset="priceRange" required="false()" type="string"/>
          </bind>
        </bind>
      </bind>
		</bind>
	</model>
	<group ref="EditContent" class="2col">
		<label>Organisation</label>
		<group>
      <group>
			  <input bind="nContentKey" class="hidden">
				  <label>ContentId</label>
			  </input>
			  <label>Settings</label>
			  <input bind="dPublishDate" class="calendar short">
				  <label>Publish date</label>
			  </input>
			  <input bind="dExpireDate" class="calendar short">
				  <label>Expire date</label>
			  </input>
			  <select1 bind="nStatus" appearance="full" class="required vshort">
				  <label>Status</label>
				  <item>
					  <label>Live</label>
					  <value>1</value>
				  </item>
				  <item>
					  <label>Hidden</label>
					  <value>0</value>
				  </item>
			  </select1>
			  <input bind="cDescription" class="short">
				  <label>Change notes</label>
			  </input>
      </group>
      <group class="Content">
        <label>Images</label>
        <input bind="cOrganizationLogo" class="short pickImage">
          <label>Logo</label>
        </input>
        <input bind="cContentFullSizePicture" class="short pickImage">
          <label>Main company image</label>
          <help class="inline">
            <p>
              This image should generally be no larger than <b>800x600 pixels, at 72dpi.</b>
            </p>
            <p>The main image is automatically resized for other smaller images such as thumbnails.</p>
            <p>However if you would like a different image for the thumbnail or main product page, they can be specified below.</p>
          </help>
        </input>
        <hint>Smaller images will be automatically resized from the fullsize. If you want to use alterative images you can add them here.</hint>
        <input bind="cContentThumbnail" class="short pickImage">
          <label>Alternative thumbnail</label>
        </input>
        <input bind="cContentDisplay" class="short pickImage">
          <label>Alternative picture</label>
        </input>
      </group>
		</group>
    <group>
	    <group class="inline">
        <label>Details</label>
        <input bind="cOrganizationName" class="required">
          <label>Organisation Name</label>
        </input>
        <select1 bind="cOrganizationType" appearance="minimal" class="required vshort">
          <label>Type</label>
          <item>
            <label>Organisation</label>
            <value>http://schema.org/Organization</value>
          </item>
          <item>
            <label>Corporation</label>
            <value>http://schema.org/Corporation</value>
          </item>
          <item>
            <label>Education</label>
            <value>http://schema.org/EducationalOrganization</value>
          </item>
          <item>
            <label>Government</label>
            <value>http://schema.org/GovernmentOrganization</value>
          </item>
          <item>
            <label>Local Business</label>
            <value>http://schema.org/LocalBusiness</value>
          </item>
          <item>
            <label>Charity / NGO</label>
            <value>http://schema.org/NGO</value>
          </item>
          <item>
            <label>Performing Group</label>
            <value>http://schema.org/PerformingGroup</value>
          </item>
          <item>
            <label>Sports Team / Club</label>
            <value>http://schema.org/SportsTeam</value>
          </item>
        </select1>
        <input bind="cOrganizationLegalName" class="">
          <label>Legal Name (if Different)</label>
        </input>
        <input bind="cOrganizationFoundingDate" class="DOBcalendar">
          <label>Founding Date</label>
        </input>
      </group>
      <group class="inline">
        <label>Contact Details</label>
        <input bind="cOrganizationTelephone">
          <label>Telephone</label>
        </input>
        <input bind="cOrganizationFax">
          <label>Fax</label>
        </input>
        <input bind="cOrganizationEmail">
          <label>Email</label>
        </input>
        <input bind="cOrganizationWebsite">
          <label>Website</label>
        </input>
        <input bind="cContentFacebook">
            <label>Facebook URL</label>
        </input>
        <input bind="cContentTwitter">
            <label>Twitter URL</label>
        </input>
        <input bind="cContentLinkedIn">
            <label>LinkedIn URL</label>
        </input>
        <input bind="cContentGooglePlus">
            <label>Google+ URL</label>
        </input>
        <input bind="cContentPinterest">
            <label>Pinterest URL</label>
        </input>
        <hint class="long">
            All URL's must start with http:// ... etc.
        </hint>
      </group>
      <group class="inline">
        <label>Location Address</label>
        <input bind="cContentLocationNo">
          <label>Building name</label>
        </input>
        <input bind="cContentLocationStreet">
          <label>Street</label>
        </input>
        <input bind="cContentLocationTown">
          <label>Town/city</label>
        </input>
        <input bind="cContentLocationRegion">
          <label>County/state</label>
        </input>
        <input bind="cContentLocationPostCode">
          <label>Postal code</label>
        </input>
        <select1 bind="cLocationCountry" class="ewQuery" query="Countries" appearance="minimal">
          <label>Country</label>
        </select1>

          <input bind="cContentLocationLat">
            <label>Latitude</label>
          </input>
          <input bind="cContentLocationLong">
            <label>Longitude</label>
          </input>
          <submit submission="" ref="" class=" hideRequired getGeocodeButton" icon="fa-map-marker">
          <label>Get latitude and longitude</label>
        </submit>

      </group>
      <group class="inline">
        <label>Postal Address (If Different)</label>
        <input bind="cPostalAddressName">
          <label>Building name</label>
        </input>
        <input bind="cPostalAddressStreet">
          <label>Street</label>
        </input>
        <input bind="cPostalAddressTown">
          <label>Town/city</label>
        </input>
        <input bind="cPostalAddressRegion">
          <label>County/state</label>
        </input>
        <input bind="cPostalAddressPostCode">
          <label>Postal code</label>
        </input>
        <select1 bind="cPostalAddressCountry" class="ewQuery" query="Countries" appearance="minimal">
          <label>Country</label>
        </select1>
      </group>
	    <group>
		    <label>Details</label>
		    <label>Short profile</label>
		    <textarea bind="cOrganizationProfile" class="TextArea xhtml" rows="5" cols="70"></textarea>
        <label>Full profile</label>
        <textarea bind="cOrganizationBody" class="TextArea xhtml" rows="15" cols="70"></textarea>
      </group>
      <group class="inline">
        <label>Additional Info</label>
        <input bind="cOrganizationDuns">
          <label>Dun &amp; Bradstreet Number</label>
        </input>


        <input bind="cOrganizationTaxID">
          <label>Tax ID</label>
        </input>
        <input bind="cOrganizationVatID">
          <label>VAT ID</label>
        </input>
        <input bind="cLocalBusinessCurrenciesAccepted">
          <label>Currencies Accepted</label>
        </input>
        <input bind="cLocalBusinessPaymentAccepted">
          <label>Payment types Accepted</label>
        </input>
        <input bind="cLocalBusinessPriceRange">
          <label>Price Range</label>
        </input>
      </group>
      <group>
        <label>Opening Hours</label>
        <textarea bind="cLocalBusinessOpeningHours" class="TextArea xhtml" rows="15" cols="70"></textarea>
        <!--
        <globalLocationNumber/>
        <usicv4/>
        <naics/>
        -->
      </group>
 
    <group>
      <label>Related People</label>
      <relatedContent type="Contact" direction="2Way" search="find add" relationType="related"/>
    </group>
    <group>
      <label>Related Review</label>
      <relatedContent type="Review" direction="2Way" search="add" relationType="related"/>
    </group>
    <group>
      <label>Related Event</label>
      <relatedContent type="Event" direction="2Way" search="add find" relationType="related"/>
    </group>
    <group>
      <label>Related Press Releases</label>
      <relatedContent type="NewsArticle" direction="2Way" search="find" relationType="related"/>
    </group>
   </group>
  </group>
	
	<group ref="submit" class="contentSubmit">
		<submit submission="" ref="ewSubmit" class="principle">
			<label>Save Organisation</label>
		</submit>
	</group>
</Content>
